﻿
namespace Test30.Engine
{
    public class GainStatAction : Action
    {
        public GainStatAction(Hero hero, Stat stat)
            : base(hero)
        {
            _stat = stat;
        }

        protected override ActionResult OnProcess()
        {
            // restore to max
            _stat.Restore();

            if (_stat.Base < Stat.BaseMax)
            {

                _stat.Base++;
            }

            return ActionResult.Done;
        }

        private readonly Stat _stat;
    }
}
